// $codepro.audit.disable noAbstractMethods
/*
 * PersistentObject.java 
 */
package edu.gatech.oad.persistence;

import java.io.FileNotFoundException;
import java.io.Serializable;
import java.util.UUID;

/**
 * @author cwakamo
 * @version 1.0
 */
public abstract class PersistentObject implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private UUID uuid = UUID.randomUUID();
	
	protected boolean hasChanges = true;
	
	public void save(String filename) throws FileNotFoundException {
		PersistenceManager.save(this, filename);
	}
	
	public UUID getUUID() {
		return this.uuid;
	}
	
	public void setUUID(UUID uuid) {
		this.uuid = uuid;
	}
	
	public void save() {
		hasChanges = true;
	}
	
}
